Warm reboot: Support portsyncd process warm restart#549
Warm reboot: Support portsyncd process warm restart#549lguohan merged 8 commits intosonic-net:masterfrom
Conversation
Signed-off-by: Jipan Yang <jipan.yang@alibaba-inc.com>
|
based on our discussion, we need to vs test for the warm reboot work flow. please add. |
Signed-off-by: Jipan Yang <jipan.yang@alibaba-inc.com>
|
jipan@sonic-build-2:~/warm_reboot/sonic-buildimage/src/sonic-swss/tests$ sudo pytest -v --dvsname=vs test_warm_reboot.py test_warm_reboot.py::test_PortSyncdWarmRestart PASSED [100%] ==================================================================== 1 passed in 36.92 seconds ==================================================================== |
Signed-off-by: Jipan Yang <jipan.yang@alibaba-inc.com>
Signed-off-by: Jipan Yang <jipan.yang@alibaba-inc.com>
|
retest this please |
portsyncd/portsyncd.cpp
Outdated
| } | ||
| } | ||
|
|
||
| void checkPortInitDone(DBConnector *appl_db) |
There was a problem hiding this comment.
checkPortInitDone [](start = 5, length = 17)
I think it is not necessary to check port table. For warm reboot, ignore all code related initialization, and just keep processing netlink messages or port config events.
Maybe we could force processing all oper_status for warm reboot, so downstream orchagent will get latest oper status immediately after finishing its warm start. #Closed
There was a problem hiding this comment.
Yes, the check is optional. It was designed to wok with the two different approaches, coupled/decoupled portsyncd and portorch. Will remove it.
|
can you resolve conflict? |
Signed-off-by: Jipan Yang <jipan.yang@alibaba-inc.com>
Signed-off-by: Jipan Yang <jipan.yang@alibaba-inc.com>
Signed-off-by: Jipan Yang <jipan.yang@alibaba-inc.com>
Submitted by: vapatil@linkedin.com
* Add Switch class * Add SwitchContainer class * Start using switch container in sairedis * Add remove switch from container
* Support portsyncd process warm restart Signed-off-by: Jipan Yang <jipan.yang@alibaba-inc.com> * [VS]: add test case for portsyncd warm restart Signed-off-by: Jipan Yang <jipan.yang@alibaba-inc.com> * Adapt to the new warm reboot schema Signed-off-by: Jipan Yang <jipan.yang@alibaba-inc.com> * Remove unneccessary netlink dump for ports Signed-off-by: Jipan Yang <jipan.yang@alibaba-inc.com> * Remove checkPortInitDone() which is optional Signed-off-by: Jipan Yang <jipan.yang@alibaba-inc.com> * Remove test_warm_reboot.py for easy merge Signed-off-by: Jipan Yang <jipan.yang@alibaba-inc.com> * Add back portsyncd warm restart test script Signed-off-by: Jipan Yang <jipan.yang@alibaba-inc.com>
Signed-off-by: Vadym Hlushko <vadymh@nvidia.com>
Signed-off-by: Jipan Yang jipan.yang@alibaba-inc.com
What I did
Add support for portsyncd process warm restart.
Why I did it
How I verified it
Check warm restart count of the swss processes
Kill portsyncd process and start it again
No traffic loss, also check restart count again, portsyncd restart_count incremented by 1
Details if related
Has dependency on
sonic-net/sonic-swss-common#211
#547